package com.yk.framework.gui.core.impl;

import java.awt.event.ActionEvent;

import javax.swing.Action;
import javax.swing.JButton;

import com.yk.framework.gui.core.AbstractYKAction;

/**
 * @author lifetime
 * 
 */
@SuppressWarnings("serial")
public class YKAction extends AbstractYKAction {
	protected JButton ownerButton;

	public YKAction(JButton ownerButton) {
		this.ownerButton = ownerButton; 
		putValue(Action.SMALL_ICON, ownerButton.getIcon());
		putValue(Action.NAME, ownerButton.getText());
		putValue(Action.SHORT_DESCRIPTION, ownerButton.getText());
		putValue(Action.LONG_DESCRIPTION, ownerButton.getText());
	}

	public void doAction(ActionEvent e) {

	}

	public JButton getOwnerButton() {
		return ownerButton;
	}

	public void setOwnerButton(JButton ownerButton) {
		this.ownerButton = ownerButton;
	}

}
